Correctly record multiple native dirs per package
authorMatt Brubeck <mbrubeck@limpet.net>
Thu, 2 Jun 2016 18:37:32 +0000 (11:37 -0700)
committerMatt Brubeck <mbrubeck@limpet.net>
Mon, 6 Jun 2016 16:24:35 +0000 (09:24 -0700)
commit3825ccccccd09f7ea0ca46eaa0210a39c99e96f8
tree1827ac7bc0c016ef92c5d05792cec0bbebfc346e
parent7d79da08238e3d47e0bc4406155bdcc45ccb8c82
Correctly record multiple native dirs per package

This fixes a bug when a package's build script outputs multiple library search
paths.  Because Compilation::native_dirs is a `HashMap<PackageId, PathBuf>` it
can only store one path per package.  Currently if there are multiple paths,
all but the last will be inserted and then overwritten.

The key from this map is never used anyway, so this fixes the bug by changing
it from a HashMap to a HashSet.
src/cargo/ops/cargo_rustc/compilation.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/ops/cargo_test.rs